program testFunctionCallRecursive;

class testFunctionCallRecursive

BEGIN
   
   VAR
      retval : integer;


FUNCTION fibonacci(value : integer): integer;
VAR value2 : integer;
BEGIN
	value2 := value;
   IF value = 1 THEN
      fibonacci := 1
   ELSE
      fibonacci := fibonacci(value2 - 1) + value2

END ;

FUNCTION testFunctionCallRecursive;
BEGIN
   retval := fibonacci(5);
   PRINT retval
END

END
.
